package com.atguigu._2facade.my2_;

public class SecurityFacade {
    private _Camera camera1, camera2;
    private _Light light1, light2, light3;
    private _Sensor sensor;
    private _Alarm alarm;

    public SecurityFacade() {
        camera1 = new _Camera();
        camera2 = new _Camera();
        light1 = new _Light();
        light2 = new _Light();
        light3 = new _Light();
        sensor = new _Sensor();
        alarm = new _Alarm();
    }

    public void Activate() {
        camera1.TurnOn();
        camera2.TurnOn();
        light1.TurnOn();
        light2.TurnOn();
        light3.TurnOn();
        sensor.Activate();
        alarm.Activate();
    }

    public void Deactivate() {
        camera1.TurnOff();
        camera2.TurnOff();
        light1.TurnOff();
        light2.TurnOff();
        light3.TurnOff();
        sensor.Deactivate();
        alarm.Deactivate();
    }
}